package com.linxin.controller;


import com.linxin.entity.Menu;
import com.linxin.mapper.MenuMapper;
import com.linxin.service.MenuService;
import com.linxin.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 后台菜单 前端控制器
 * </p>
 *
 * @author linxin
 * @since 2022-05-04
 */
@RestController
@RequestMapping("/admin/system")
public class MenuController {
    @Autowired
    private MenuService menuService;
    //根据用户id 获取用户对应的后台菜单
    @PostMapping("/menu")
    public List<Menu> getMenusByAdminId(){
        return menuService.getMenusByAdminId();
    }


}

